function getSetting() {
  wx.getSetting({
    success(res) {
      if (!res.authSetting['scope.userLocation']) {
        wx.authorize({
          scope: 'scope.userLocation',
          success() {
            // 用户已经同意小程序使用地图功能，后续调用 wx.userLocation 接口不会弹窗询问
          },
          fail() {
            console.log('失败');
            wx.showModal({
              title: '',
              content: '【船政文化旅游景区导航】需要获取您的地理位置，请确认授权',
              success: function (res) {
                if (res.cancel) {
                  wx.showToast({
                    title: '获取位置失败',
                    icon: 'none',
                  });
                  setTimeout(() => {
                    wx.navigateBack();
                  }, 1500);
                } else if (res.confirm) {
                  wx.openSetting({
                    success: function (res) {
                      // console.log('dataAu:success', dataAu)
                      console.log(res.authSetting);
                    },
                  });
                }
              },
            });
          },
        });
      }
    },
  });
}
export default {
  getSetting
}